# -*- coding: utf-8; -*-

# -*-ruby-*-
# bot_file_name and BotClassName must be same name
# (BotClassName.downcase == bot_file_name)

# path setting
this_file_s_path = File.expand_path(File.dirname(__FILE__))
twym_path = File.expand_path(this_file_s_path + "/../../")
rbuconv_path = File.expand_path(this_file_s_path + "/../../rbuconv/")
$LOAD_PATH.unshift twym_path
$LOAD_PATH.unshift rbuconv_path
$LOAD_PATH.unshift this_file_s_path


require 'TwYM'
$qc = ToQC.new

class TwYMBot < Nadoka::NDK_Bot
  def on_privmsg prefix, ch, msg
    $qc.send "#{prefix.nick}: #{msg}"
    until $qc.queue_empty?
        sleep 1
        $qc.send nil
    end
  end
end

